package schemas

import "github.com/gin-gonic/gin"

type CreateProject struct {
	ID        uint   `json:"id" default:"0"`
	Name      string `json:"name" form:"name" binding:"required" comment:"项目名称"`
	Introduce string `json:"introduce" form:"introduce" binding:"required" comment:"项目介绍"`
	TeamID    uint   `json:"team_id" form:"team_id" binding:"required" comment:"团队ID"`
}

func (s *CreateProject) BindValidParam(ctx *gin.Context) error {
	return DefaultGetValidParams(ctx, s)
}

type QueryProject struct {
	TeamID   uint `json:"team_id" form:"team_id" binding:"required" comment:"团队ID"`
	Page     int  `json:"page" form:"page" binding:"required" comment:"页码"`
	PageSize int  `json:"pageSize" form:"pageSize" binding:"required" comment:"每页数量"`
}

func (s *QueryProject) BindValidParam(ctx *gin.Context) error {
	return DefaultGetValidParams(ctx, s)
}
